# Generated by Django 4.1.7 on 2023-03-13 15:37

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('check', '0024_interfacescomments_datetime'),
    ]

    operations = [
        migrations.CreateModel(
            name='MacAddress',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('address', models.CharField(max_length=12)),
                ('vlan', models.PositiveSmallIntegerField(validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(4096)])),
                ('type', models.CharField(max_length=1)),
                ('port', models.CharField(max_length=50)),
                ('desc', models.CharField(max_length=128)),
                ('datetime', models.DateTimeField(auto_now_add=True)),
                ('device', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='check.devices')),
            ],
            options={
                'db_table': 'mac_addresses',
            },
        ),
        migrations.AddIndex(
            model_name='macaddress',
            index=models.Index(fields=['address'], name='mac_address_index'),
        ),
        migrations.AlterUniqueTogether(
            name='macaddress',
            unique_together={('address', 'device', 'port')},
        ),
    ]
